// Copyright 2018-2021 Polyaxon, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * Polyaxon SDKs and REST API specification.
 * Polyaxon SDKs and REST API specification.
 *
 * The version of the OpenAPI document: 1.7.4
 * Contact: contact@polyaxon.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';

/**
 * The V1Environment model module.
 * @module model/V1Environment
 * @version 1.7.4
 */
class V1Environment {
    /**
     * Constructs a new <code>V1Environment</code>.
     * @alias module:model/V1Environment
     */
    constructor() { 
        
        V1Environment.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>V1Environment</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/V1Environment} obj Optional instance to populate.
     * @return {module:model/V1Environment} The populated <code>V1Environment</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new V1Environment();

            if (data.hasOwnProperty('labels')) {
                obj['labels'] = ApiClient.convertToType(data['labels'], {'String': 'String'});
            }
            if (data.hasOwnProperty('annotations')) {
                obj['annotations'] = ApiClient.convertToType(data['annotations'], {'String': 'String'});
            }
            if (data.hasOwnProperty('nodeSelector')) {
                obj['nodeSelector'] = ApiClient.convertToType(data['nodeSelector'], {'String': 'String'});
            }
            if (data.hasOwnProperty('affinity')) {
                obj['affinity'] = ApiClient.convertToType(data['affinity'], Object);
            }
            if (data.hasOwnProperty('tolerations')) {
                obj['tolerations'] = ApiClient.convertToType(data['tolerations'], [Object]);
            }
            if (data.hasOwnProperty('nodeName')) {
                obj['nodeName'] = ApiClient.convertToType(data['nodeName'], 'String');
            }
            if (data.hasOwnProperty('serviceAccountName')) {
                obj['serviceAccountName'] = ApiClient.convertToType(data['serviceAccountName'], 'String');
            }
            if (data.hasOwnProperty('hostAliases')) {
                obj['hostAliases'] = ApiClient.convertToType(data['hostAliases'], [Object]);
            }
            if (data.hasOwnProperty('securityContext')) {
                obj['securityContext'] = ApiClient.convertToType(data['securityContext'], Object);
            }
            if (data.hasOwnProperty('imagePullSecrets')) {
                obj['imagePullSecrets'] = ApiClient.convertToType(data['imagePullSecrets'], ['String']);
            }
            if (data.hasOwnProperty('hostNetwork')) {
                obj['hostNetwork'] = ApiClient.convertToType(data['hostNetwork'], 'Boolean');
            }
            if (data.hasOwnProperty('hostPID')) {
                obj['hostPID'] = ApiClient.convertToType(data['hostPID'], 'String');
            }
            if (data.hasOwnProperty('dnsPolicy')) {
                obj['dnsPolicy'] = ApiClient.convertToType(data['dnsPolicy'], 'String');
            }
            if (data.hasOwnProperty('dnsConfig')) {
                obj['dnsConfig'] = ApiClient.convertToType(data['dnsConfig'], Object);
            }
            if (data.hasOwnProperty('schedulerName')) {
                obj['schedulerName'] = ApiClient.convertToType(data['schedulerName'], 'String');
            }
            if (data.hasOwnProperty('priorityClassName')) {
                obj['priorityClassName'] = ApiClient.convertToType(data['priorityClassName'], 'String');
            }
            if (data.hasOwnProperty('priority')) {
                obj['priority'] = ApiClient.convertToType(data['priority'], 'Number');
            }
            if (data.hasOwnProperty('restartPolicy')) {
                obj['restartPolicy'] = ApiClient.convertToType(data['restartPolicy'], 'String');
            }
        }
        return obj;
    }


}

/**
 * @member {Object.<String, String>} labels
 */
V1Environment.prototype['labels'] = undefined;

/**
 * @member {Object.<String, String>} annotations
 */
V1Environment.prototype['annotations'] = undefined;

/**
 * @member {Object.<String, String>} nodeSelector
 */
V1Environment.prototype['nodeSelector'] = undefined;

/**
 * @member {Object} affinity
 */
V1Environment.prototype['affinity'] = undefined;

/**
 * Optional Tolerations to apply.
 * @member {Array.<Object>} tolerations
 */
V1Environment.prototype['tolerations'] = undefined;

/**
 * Optional NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.
 * @member {String} nodeName
 */
V1Environment.prototype['nodeName'] = undefined;

/**
 * @member {String} serviceAccountName
 */
V1Environment.prototype['serviceAccountName'] = undefined;

/**
 * Optional HostAliases is an optional list of hosts and IPs that will be injected into the pod spec.
 * @member {Array.<Object>} hostAliases
 */
V1Environment.prototype['hostAliases'] = undefined;

/**
 * @member {Object} securityContext
 */
V1Environment.prototype['securityContext'] = undefined;

/**
 * @member {Array.<String>} imagePullSecrets
 */
V1Environment.prototype['imagePullSecrets'] = undefined;

/**
 * Host networking requested for this workflow pod. Default to false.
 * @member {Boolean} hostNetwork
 */
V1Environment.prototype['hostNetwork'] = undefined;

/**
 * Use the host's pid namespace. Default to false.
 * @member {String} hostPID
 */
V1Environment.prototype['hostPID'] = undefined;

/**
 * Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.
 * @member {String} dnsPolicy
 */
V1Environment.prototype['dnsPolicy'] = undefined;

/**
 * @member {Object} dnsConfig
 */
V1Environment.prototype['dnsConfig'] = undefined;

/**
 * @member {String} schedulerName
 */
V1Environment.prototype['schedulerName'] = undefined;

/**
 * If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.
 * @member {String} priorityClassName
 */
V1Environment.prototype['priorityClassName'] = undefined;

/**
 * The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.
 * @member {Number} priority
 */
V1Environment.prototype['priority'] = undefined;

/**
 * @member {String} restartPolicy
 */
V1Environment.prototype['restartPolicy'] = undefined;






export default V1Environment;

